/**
 *
 */
package st.yushao.restaurant.dao.hibernateImpl;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import st.yushao.restaurant.dao.FoodDaoService;
import st.yushao.restaurant.vo.FoodVO;


/**
 * @author acer
 */
public class FoodDaoServiceHibImpl extends HibernateDaoSupport implements FoodDaoService {

    public List<FoodVO> getFoodListByType(int foodTypeId) {
        return (List<FoodVO>) getHibernateTemplate().find("from FoodVO where typeId=?", foodTypeId);
    }

    @Override
    public FoodVO getFoodById(int foodId) {
        return getHibernateTemplate().get(FoodVO.class, foodId);
    }

    @Override
    public void updFoodInfo(FoodVO foodVO) {
        getHibernateTemplate().update(foodVO);
    }

    @Override
    public Integer addFoodInfo(FoodVO foodVO) {
        // TODO Auto-generated method stub
        return null;
    }
}
